﻿@model VideoCache.Server.ViewModel.AlbumCollectionModel

@{
    ViewBag.Title = "视频管理";
}
<h2>@ViewBag.Title</h2>
<p>
    <a href="@Url.Action("Create")" class="button">新建</a>
    <a href="@Url.Action("Delete")" class="button selectDelete" group="chk">删除</a>
    <a href="@Url.Action("Apply")" class="button selectDelete" group="chk">审核通过</a>
</p>
<div class="search">
<form action="@Url.Action("Index")" method = "get">
    <ul>
        <li><label>关键字 <input name="keyword" type="text" value="@ViewBag.Keyword" /></label></li>
        <li>@Html.DropDownList("TypeId", "不限类别")</li>
        <li>@Html.DropDownList("AreaId", "不限地区")</li>
        <li>@Html.DropDownList("Status", "不限状态")</li>
        <li><button type="submit">搜索</button></li>
    </ul>
</form>
</div>
<table class="list" width="100%">
<thead>
    <tr>
        <th width="10"><input type="checkbox" group="chk" class="selectAll" /></th>
        <th width="50">编号</th>
        <th>标题</th>
        <th width="50">类别</th>
        <th width="50">地区</th>
        <th width="50">评分</th>
        <th width="150">导演</th>
        <th width="250">主演</th>
        <th width="50">年代</th>
        <th width="50">完结</th>
        <th width="50">优先级</th>
        <th width="150">更新时间</th>
        <th width="50">状态</th>
        <th width="80"></th>
    </tr>
</thead>
<tbody>
@foreach (var item in Model.Items)
{
    <tr>
        <td><input type="checkbox" group="chk" value="@item.Id" /></td>
        <td>@item.Id</td>
        <td>@Html.ActionLink(item.Title, "ViewSites", new { id=item.Id })</td>
        <td>@item.TypeId</td>
        <td>@item.AreaId</td>
        <td>@item.Rating</td>
        <td>@Html.ShowText(item.Director,13)</td>
        <td>@Html.ShowText(item.Actor,23)</td>
        <td>@item.PubYear</td>
        <td>@item.IsEnd</td>
        <td>@item.Priority</td>
        <td>@String.Format("{0:g}", item.ModifyTime)</td>
        <td>@item.Status</td>
        <td>
            @Html.ActionLink("修改", "Edit", new { id=item.Id }) |
            @Html.ActionLink("删除", "Delete", new { id = item.Id }, new { @class = "delete" })
        </td>
    </tr>
}
</tbody>
</table>
<div class="pager">
    @Html.Pager("page", Model.PageSize, Model.RecordCount)
</div>